package bitetorrentserver;

/**
 *
 * @author user
 */
public class PeerFile {

    public String info_hash = ""; // Nama file yg di akan / sedang didownload
    public String address = ""; // Ip address peer
    public int port = 0;    // Port yg dibuka peer
    public int uploaded = 0;    // Telah mengupload berapa
    public int downloaded = 0;  // telah men
    public int left = 0;
    public long timeout = 0;

    public PeerFile() {
    }

    @Override
    public String toString() {
        String str = "";
        str += "info hash : " + info_hash + "\n";
        str += "address : " + address + "\n";
        str += "port : " + port + "\n";
        str += "uploaded : " + uploaded + "\n";
        str += "downloaded : " + downloaded + "\n";
        str += "left : " + left;
        str += "timeout : " + timeout;

        return str;
    }
}
